<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">


<h:head>
	<title>Crea GiftList</title>
</h:head>
<h:body>
	<ui:composition template="../template.xhtml">
		<ui:define name="menu">


			<h:form prependId="false">
				<p:menu id="left">

					<p:submenu label="Area Personale">
						<p:menuitem value="Home" outcome="index" icon="ui-icon-home" />
						<p:menuitem value="Cronologia Viaggi" outcome="storicoViaggi"
							icon="ui-icon-star" />
						<p:menuitem value="Le Mie GiftList" outcome="statoGift"
							icon="ui-icon-star" />
						<p:menuitem value="Invito Viaggi" outcome="showInviti"
							icon="ui-icon-star" />
						<p:menuitem value="Invito Giftlist" outcome="showInvitiGift"
							icon="ui-icon-star" />
						<p:menuitem value="Logout" action="#{logoutBean.logout()}"
							icon="ui-icon-close" />
					</p:submenu>
				</p:menu>
			</h:form>
		</ui:define>
		<ui:define name="content">
			<h1>Hello #{userBean.name}</h1>
			<h:form>
				<p:commandButton action="#{logoutBean.logout}" value="Logout" />
				<h1>Amici alla quale vuoi chiedere di contribuire alal tua gift</h1>

				<p:panel header="Make Gift">
					<h:panelGrid columns="3" id="regGrid">
						<h:outputLabel for="a1" value="Amico1: " />
						<p:inputText id="a1" value="#{giftBean.amico1}" />
						<h:outputLabel />
						<h:outputLabel for="a2" value="Amico2: " />
						<p:inputText id="a2" value="#{giftBean.amico2}" />
						<h:outputLabel />
						<h:outputLabel for="a3" value="Amico3: " />
						<p:inputText id="a3" value="#{giftBean.amico3}" />
						<h:outputLabel />
						<h:outputLabel for="a4" value="Amico4: " />
						<p:inputText id="a4" value="#{giftBean.amico4}" />
						<h:outputLabel />
						<h:outputText />
						<h:outputText />
						<h:outputText />
						<h:outputText />
						<p:commandButton value="Invia gli inviti" icon="ui-icon-search"
							update="regGrid" actionListener="#{giftBean.invita()}" />

					</h:panelGrid>
				</p:panel>

			</h:form>
		</ui:define>

	</ui:composition>
</h:body>
</html>